package com.winsdom.mapper;

import com.winsdom.entity.Customer;
import com.winsdom.vo.CustomerQueryVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.winsdom.vo.contract.CustomervO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 客户主表(公共字段) Mapper 接口
 * </p>
 *
 * @author 
 * @since 2025-05-12
 */
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {
    @MapKey("customer_id")
    List<Map<String, Object>> selectCustomerWithUpdateUserName(CustomerQueryVO query);

    @Select("select customer_id,customer_name,mobile_phone from customer where status=1")
    List<CustomervO> selectForList();
    int updateLegalProcedure(@Param("customerId") Long customerId, @Param("updateUserId") Long updateUserId);

    int updateCustomerStatus(@Param("customerId") Long customerId, @Param("updateUserId") Long updateUserId);
}
